package core.gamestates;

import gui.Menu;

import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

import core.GameFlow;
import core.GameState;

public class GameOverState extends GameState {

	InGameState bg;
	Menu interfaz;

	public GameOverState(InGameState bg_) {
		bg = bg_;
		interfaz = new Menu();

		interfaz.addButtonListener(GameFlow.getInstance());
		interfaz.addButton("Back to Menu", 100, 100, 200, 30,
				GameFlow.SWITCH_TO_MENU_STATE);
		interfaz.addButton("Exit Game", 100, 300, 200, 30,
				GameFlow.EXIT_APLICATION);

		interfaz.addButton("GAME OVER", 200, 30, 400, 40, -1);
		bg.pause();
		renderer.addElement(bg.getMap());
		renderer.addElement(interfaz);

	}

	@Override
	public boolean onClick(MouseEvent m) {
		// TODO Auto-generated method stub
		boolean b = false;
		b = interfaz.onClick(m);
		return b;
	}

	@Override
	public void onKeyPresed(KeyEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void reset() {
		// TODO Auto-generated method stub

	}

	@Override
	public void update() {
		// TODO Auto-generated method stub

	}

	@Override
	public void updateMouse(Point p) {
		// TODO Auto-generated method stub
		interfaz.updateMouse(p);
	}

}
